import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from '@cool-midway/core';
import { Column, Index } from 'typeorm';

/**
 * 商品
 */
@EntityModel('weibo_blog_love', {
  orderBy: {
    id: 'DESC',
  },
})
@Index('IDX_BLOG_USER', ['userId', 'blogId'], { unique: true })
export class WeiboBlogLoveEntity extends BaseEntity {
  @Column({ comment: '用户id', type: 'int', name: 'user_id' })
  userId: number;

  @Column({ comment: '博客ID', type: 'int', name: 'blog_id' })
  blogId: number;
}
